Method for transmitting data in wireless local area network mesh network, apparatus, and system

ABSTRACT

Example methods, apparatuses, and systems for transmitting data in a wireless local area network mesh network are described herein. One example method includes receiving, by a first mesh station, a first data frame sent by a second mesh station, where a transmitter address of the first data frame is a MAC address of the second mesh station, and wherein the first and second mesh stations belong to different mesh gates. The first mesh station determines that the first data frame is one of a broadcast data frame, a multicast data frame, or an unknown unicast data frame and, further, that the first mesh station and the second mesh station belong to different mesh gates. In response to these determinations, the first data frame is discarded. The examples methods can be applied to a wireless mesh network including multiple mesh gates.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2015/085451, filed on Jul. 29, 2015, the disclosure of which ishereby incorporated by reference in its entirety.

TECHNICAL FIELD

This application relates to the communications field, and in particular,to a method for transmitting data in a wireless local area network(WLAN) mesh network, an apparatus, and a system.

BACKGROUND

A network may include a WLAN mesh network (hereinafter referred to as awireless mesh network) and an external network. If the wireless meshnetwork is connected to the external network by using multiple meshgates, a loop may occur in the network including the wireless meshnetwork and the external network. The mesh gate refers to a device thathas a function of a mesh station and that provides a mesh basic serviceset (MBSS) with access, for which a wireless medium (WM) is used, to oneor more distribution systems. The external network is a distributionsystem connected to the mesh gate. The external network may be a wirednetwork or a combination of a wired network and a wireless network.

For example, in a network shown in FIG. 1, a wireless mesh networkincludes a gateway 1, a gateway 2, and multiple mesh stations. Both thegateway 1 and the gateway 2 are mesh gates. An external networkconnected to the wireless mesh network includes a network switch. Thenetwork switch is connected to the gateway 1 and the gateway 2. Abroadcast data frame, a multicast data frame, or an unknown unicast dataframe sent by the gateway 1 may arrive at the gateway 2 by using themesh station in the wireless mesh network. Because both the gateway 1and the gateway 2 are connected to the network switch, the data framemay arrive at the gateway 1 by using the network switch. Consequently,the data frame loops constantly in the wireless mesh network, piles up,and ultimately causes a network storm, that is, causes a loop in thenetwork shown in FIG. 1.

The Institute of Electrical and Electronics Engineers (IEEE) 802.11-2012protocol specifies that a switching device, for example, a networkswitch, in an external network uses the Rapid Spanning Tree Protocol(RSTP) to resolve a problem of a loop between a wireless mesh networkand the external network. Specifically, RSTP blocks some ports in thenetwork, so that the wireless mesh network and the external network canbe connected by using only one mesh gate, thereby resolving the loopproblem.

If the loop problem is resolved by using the foregoing method, thewireless mesh network and the external network can be connected by usingonly one mesh gate. If the wireless mesh network is large in scale, asingle mesh gate cannot process data between the large-scale wirelessmesh network and the external network in a timely manner. Consequently,congestion occurs at the mesh gate.

SUMMARY

Embodiments of the present invention provide a method for transmittingdata in a WLAN mesh network, an apparatus, and a system, so as toprevent congestion at a mesh gate while avoiding a loop.

To achieve the foregoing objective, the embodiments of the presentinvention use the following technical solutions:

According to a first aspect, an embodiment of the present inventionprovides a method for transmitting data in a WLAN mesh network, wherethe method includes:

receiving, by a first mesh station, a first data frame sent by a secondmesh station, where a transmitter address of the first data frame is amedia access control (MAC) address of the second mesh station, the firstmesh station belongs to a first mesh gate, and the second mesh stationbelongs to a second mesh gate; and

determining, by the first mesh station, that the first data frame is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe; determining, according to the MAC address of the second meshstation, that the first mesh station and the second mesh station belongto different mesh gates; and discarding the first data frame.

With reference to the first aspect, in a first possible implementationmanner of the first aspect, before the receiving, by a first meshstation, a first data frame sent by a second mesh station, the methodfurther includes:

receiving, by the first mesh station, a management frame sent by thesecond mesh station, where a transmitter address of the management frameis the MAC address of the second mesh station, and the management frameincludes an identifier of the second mesh gate; and

obtaining, by the first mesh station, a correspondence between thesecond mesh station and the second mesh gate; and

the determining, by the first mesh station according to the MAC addressof the second mesh station, that the first mesh station and the secondmesh station belong to different mesh gates includes:

determining, by the first mesh station according to the MAC address ofthe second mesh station and the correspondence between the second meshstation and the second mesh gate, that the first mesh station and thesecond mesh station belong to different mesh gates.

With reference to the first aspect or the first possible implementationmanner of the first aspect, in a second possible implementation mannerof the first aspect, before the receiving, by a first mesh station, afirst data frame sent by a second mesh station, the method furtherincludes:

-   -   determining, by the first mesh station, a minimum overhead        between the first mesh station and each of multiple mesh gates,        where the multiple mesh gates include the first mesh gate and        the second mesh gate; and    -   selecting, by the first mesh station, the first mesh gate as a        mesh gate to which the first mesh station belongs, where among        the multiple mesh gates an overhead between the first mesh gate        and the first mesh station is the minimum overhead.

With reference to any one of the first aspect, or the first or thesecond possible implementation manner of the first aspect, in a thirdpossible implementation manner of the first aspect, the method furtherincludes:

receiving, by the first mesh station, a second data frame sent by athird mesh station, where a transmitter address of the second data frameis a MAC address of the third mesh station, and the third mesh stationbelongs to the first mesh gate; and

determining, by the first mesh station, that the second data frame is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe; determining, according to the MAC address of the third meshstation, that the first mesh station and the third mesh station belongto a same mesh gate; and processing the second data frame.

With reference to any one of the first aspect, or the first to the thirdpossible implementation manners of the first aspect, in a fourthpossible implementation manner of the first aspect, the method furtherincludes:

receiving, by the first mesh station, a third data frame sent by thesecond mesh station, where a transmitter address of the third data frameis the MAC address of the second mesh station; and

determining, by the first mesh station, that the third data frame is aknown unicast data frame; and forwarding the third data frame.

With reference to any one of the first aspect, or the first to thefourth possible implementation manners of the first aspect, in a fifthpossible implementation manner of the first aspect, the method furtherincludes:

determining, by the first mesh station, that a receiver address of ato-be-sent fourth data frame is the MAC address of the second meshstation; determining that the fourth data frame is a broadcast dataframe or a multicast data frame; and skipping sending the fourth dataframe.

According to a second aspect, an embodiment of the present inventionprovides a station, where the station is a mesh station supporting amesh function, the mesh station is a first mesh station, and the firstmesh station includes:

a receiving unit, configured to receive a first data frame sent by asecond mesh station, where a transmitter address of the first data frameis a MAC address of the second mesh station, the first mesh stationbelongs to a first mesh gate, and the second mesh station belongs to asecond mesh gate;

a determining unit, configured to: determine that the first data framereceived by the receiving unit is a broadcast data frame, a multicastdata frame, or an unknown unicast data frame; and determine, accordingto the MAC address of the second mesh station that is received by thereceiving unit, that the first mesh station and the second mesh stationbelong to different mesh gates; and

a processing unit, configured to discard, according to the resultdetermined by the determining unit, the first data frame received by thereceiving unit.

With reference to the second aspect, in a first possible implementationmanner of the second aspect, the first mesh station further includes anobtaining unit, where

the receiving unit is further configured to: before receiving the firstdata frame sent by the second mesh station, receive a management framesent by the second mesh station, where a transmitter address of themanagement frame is the MAC address of the second mesh station, and themanagement frame includes an identifier of the second mesh gate;

the obtaining unit is configured to obtain a correspondence between thesecond mesh station and the second mesh gate; and

the determining unit is specifically configured to determine, accordingto the MAC address of the second mesh station that is received by thereceiving unit and the correspondence between the second mesh stationand the second mesh gate that is obtained by the obtaining unit, thatthe first mesh station and the second mesh station belong to differentmesh gates.

With reference to the second aspect or the first possible implementationmanner of the second aspect, in a second possible implementation mannerof the second aspect, the first mesh station further includes aselection unit, where

-   -   the determining unit is further configured to: before the        receiving unit receives the first data frame sent by the second        mesh station, determine a minimum overhead between the first        mesh station and each of multiple mesh gates, where the multiple        mesh gates include the first mesh gate and the second mesh gate;        and    -   the selection unit is configured to select, according to the        minimum overhead that is between the first mesh station and each        of the multiple mesh gates and that is determined by the        determining unit, the first mesh gate as a mesh gate to which        the first mesh station belongs, where among the multiple mesh        gates an overhead between the first mesh gate and the first mesh        station is the minimum overhead.

With reference to any one of the second aspect, or the first or thesecond possible implementation manner of the second aspect, in a thirdpossible implementation manner of the second aspect,

the receiving unit is further configured to receive a second data framesent by a third mesh station, where a transmitter address of the seconddata frame is a MAC address of the third mesh station, and the thirdmesh station belongs to the first mesh gate;

the determining unit is further configured to: determine that the seconddata frame received by the receiving unit is a broadcast data frame, amulticast data frame, or an unknown unicast data frame; and determine,according to the MAC address of the third mesh station that is receivedby the receiving unit, that the first mesh station and the third meshstation belong to a same mesh gate; and

the processing unit is further configured to process, according to theresult determined by the determining unit, the second data framereceived by the receiving unit.

With reference to any one of the second aspect, or the first to thethird possible implementation manners of the second aspect, in a fourthpossible implementation manner of the second aspect,

the receiving unit is further configured to receive a third data framesent by the second mesh station, where a transmitter address of thethird data frame is the MAC address of the second mesh station;

the determining unit is further configured to determine that the thirddata frame received by the receiving unit is a known unicast data frame;and

the processing unit is further configured to forward the third dataframe according to the result determined by the determining unit.

With reference to any one of the second aspect, or the first to thefourth possible implementation manners of the second aspect, in a fifthpossible implementation manner of the second aspect,

the determining unit is further configured to: determine that a receiveraddress of a to-be-sent fourth data frame is the MAC address of thesecond mesh station, and determine that the fourth data frame is abroadcast data frame or a multicast data frame; and

the processing unit is further configured to skip sending the fourthdata frame according to the result determined by the determining unit.

According to a third aspect, an embodiment of the present inventionprovides a station, where the station is a mesh station supporting amesh function, the mesh station is a first mesh station, and the firstmesh station includes:

a transceiver, configured to receive a first data frame sent by a secondmesh station, where a transmitter address of the first data frame is amedia access control (MAC) address of the second mesh station, the firstmesh station belongs to a first mesh gate, and the second mesh stationbelongs to a second mesh gate; and

a processor, configured to: determine that the first data frame receivedby the transceiver is a broadcast data frame, a multicast data frame, oran unknown unicast data frame; determine, according to the MAC addressof the second mesh station that is received by the transceiver, that thefirst mesh station and the second mesh station belong to different meshgates; and discard the first data frame received by the transceiver.

With reference to the third aspect, in a first possible implementationmanner of the third aspect,

the transceiver is further configured to: before receiving the firstdata frame sent by the second mesh station, receive a management framesent by the second mesh station, where a transmitter address of themanagement frame is the MAC address of the second mesh station, and themanagement frame includes an identifier of the second mesh gate; and

the processor is further configured to: obtain a correspondence betweenthe second mesh station and the second mesh gate; and determine,according to the MAC address of the second mesh station that is receivedby the transceiver and the correspondence between the second meshstation and the second mesh gate, that the first mesh station and thesecond mesh station belong to different mesh gates.

With reference to the third aspect or the first possible implementationmanner of the third aspect, in a second possible implementation mannerof the third aspect,

-   -   the processor is further configured to: before the transceiver        receives the first data frame sent by the second mesh station,        determine a minimum overhead between the first mesh station and        each of multiple mesh gates; and select, according to the        minimum overhead between the first mesh station and each of the        multiple mesh gates, the first mesh gate as a mesh gate to which        the first mesh station belongs, where the multiple mesh gates        include the first mesh gate and the second mesh gate, and among        the multiple mesh gates an overhead between the first mesh gate        and the first mesh station is the minimum overhead.

With reference to any one of the third aspect, or the first or thesecond possible implementation manner of the third aspect, in a thirdpossible implementation manner of the third aspect,

the transceiver is further configured to receive a second data framesent by a third mesh station, where a transmitter address of the seconddata frame is a MAC address of the third mesh station, and the thirdmesh station belongs to the first mesh gate; and

the processor is further configured to: determine that the second dataframe received by the transceiver is a broadcast data frame, a multicastdata frame, or an unknown unicast data frame; determine, according tothe MAC address of the third mesh station that is received by thetransceiver, that the first mesh station and the third mesh stationbelong to a same mesh gate; and process the second data frame receivedby the transceiver.

With reference to any one of the third aspect, or the first to the thirdpossible implementation manners of the third aspect, in a fourthpossible implementation manner of the third aspect,

the transceiver is further configured to receive a third data frame sentby the second mesh station, where a transmitter address of the thirddata frame is the MAC address of the second mesh station; and

the processor is further configured to: determine that the third dataframe received by the transceiver is a known unicast data frame, andforward the third data frame received by the transceiver.

With reference to any one of the third aspect, or the first to thefourth possible implementation manners of the third aspect, in a fifthpossible implementation manner of the third aspect,

the processor is further configured to: determine that a receiveraddress of a to-be-sent fourth data frame is the MAC address of thesecond mesh station, determine that the fourth data frame is a broadcastdata frame or a multicast data frame, and skip sending the fourth dataframe.

According to a fourth aspect, an embodiment of the present inventionprovides a WLAN mesh network system, where the system includes:

a first mesh station, a second mesh station, and multiple mesh gates,where

the first mesh station is the first mesh station according to any one ofthe third aspect or the possible implementation manners of the thirdaspect.

Based on the foregoing technical solutions, on the one hand, when afirst data frame that is received by a first mesh station and sent by asecond mesh station that belongs to a mesh gate different from that towhich the first mesh station belongs is a broadcast data frame, amulticast data frame, or an unknown unicast data frame, the first meshstation discards the first data frame, that is, the first mesh stationdoes not process the first data frame, so that the first data frame isnot propagated between different mesh gates. Therefore, a loop in anetwork including a wireless mesh network and an external network can beavoided. On the other hand, in the embodiments of the present invention,because there is still a first mesh gate and a second mesh gate, and aquantity of mesh gates in the wireless mesh network is not reduced,congestion at the mesh gate can be prevented. Therefore, in theembodiments of the present invention, congestion at the mesh gate can beprevented while a loop is avoided.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention or conventional technical solutions more clearly, thefollowing briefly describes the accompanying drawings required fordescribing the embodiments of the present invention or the conventionaltechnical solutions. Apparently, the accompanying drawings in thefollowing description show merely some embodiments of the presentinvention, and a person of ordinary skill in the art may still deriveother drawings from these accompanying drawings without creativeefforts.

FIG. 1 is a schematic architectural diagram of a conventional wirelessmesh network;

FIG. 2 is a schematic architectural diagram of a wireless mesh networkaccording to an embodiment of the present invention;

FIG. 3 is a flowchart 1 of a method for transmitting data in a wirelessmesh network according to an embodiment of the present invention;

FIG. 4 is a flowchart 2 of a method for transmitting data in a wirelessmesh network according to an embodiment of the present invention;

FIG. 5 is a flowchart 3 of a method for transmitting data in a wirelessmesh network according to an embodiment of the present invention;

FIG. 6 is a flowchart 4 of a method for transmitting data in a wirelessmesh network according to an embodiment of the present invention;

FIG. 7 is a flowchart 5 of a method for transmitting data in a wirelessmesh network according to an embodiment of the present invention;

FIG. 8 is a flowchart 6 of a method for transmitting data in a wirelessmesh network according to an embodiment of the present invention;

FIG. 9 is a schematic structural diagram 1 of a mesh station accordingto an embodiment of the present invention;

FIG. 10 is a schematic structural diagram 2 of a mesh station accordingto an embodiment of the present invention;

FIG. 11 is a schematic structural diagram 3 of a mesh station accordingto an embodiment of the present invention; and

FIG. 12 is a schematic hardware diagram of a mesh station according toan embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

The following clearly describes the technical solutions in theembodiments of the present invention with reference to the accompanyingdrawings in the embodiments of the present invention.

Generally, “/” mentioned in the embodiments of the present inventionindicates an “or” relationship between associated objects. For example,“A/B” may be construed as “A” or

For ease of description, a WLAN mesh network provided in the embodimentsof the present invention is referred to as a wireless mesh network inthe following. That is, a method for transmitting data in a WLAN meshnetwork, an apparatus, and a system that are provided in the embodimentsof the present invention may be a method for transmitting data in awireless mesh network, an apparatus, and a system.

The method for transmitting data in a wireless mesh network, theapparatus, and the system that are provided in the embodiments of thepresent invention can be applied to a wireless mesh network includingmultiple mesh gates. For example, as shown in FIG. 2, FIG. 2 is anarchitectural diagram of a possible application scenario of the methodfor transmitting data in a wireless mesh network, the apparatus, and thesystem that are provided in the embodiments of the present invention.The architectural diagram is an architectural diagram of a wireless meshnetwork system.

In FIG. 2, a wireless mesh network includes two mesh gates and multiplemesh stations. The two mesh gates are a gateway 1 and a gateway 2respectively. The multiple mesh stations are a station 1, a station 2, astation 3, and a station 4 respectively. An external network connectedto the wireless mesh network includes a network switch. The networkswitch is connected to the gateway 1 and the gateway 2. The gateway 1establishes a mesh link with the station 1 and the station 2. Thegateway 2 establishes a mesh link with the station 1 and the station 2.A mesh link is established between any two of the station 1, the station2, the station 3, or the station 4. The station 1 and the station 3belong to the gateway 1, and the station 2 and the station 4 belong tothe gateway 2. The mesh link refers to a link between a mesh station anda neighboring mesh station that have a mesh peering with each other.

In the following embodiments, a subnet involved in descriptions of themethod for transmitting data in a wireless mesh network, the apparatus,and the system is logical division of a wireless mesh network. It may beconsidered that mesh stations that belong to a same mesh gate belong toa same subnet. Specifically, division/formation of a subnet of awireless mesh network is described in detail in the followingembodiments.

Embodiment 1

As shown in FIG. 3, this embodiment of the present invention provides amethod for transmitting data in a wireless mesh network. The method mayinclude the following steps.

S101. A first mesh station receives a first data frame sent by a secondmesh station, where a transmitter address of the first data frame is aMAC address of the second mesh station, the first mesh station belongsto a first mesh gate, and the second mesh station belongs to a secondmesh gate.

In this embodiment of the present invention, the first mesh station andthe second mesh station are two mesh stations in a wireless meshnetwork. The first mesh station and the second mesh station areneighboring stations that have a mesh peering with each other. The firstmesh station may be an access point (AP). The second mesh station mayalso be an AP. The mesh peering refers to a relationship between twomesh stations that is required for direct communication over a singleinstance of the wireless medium. A mesh peering is established with amesh peering protocol.

In the method for transmitting data in a wireless mesh network providedin this embodiment of the present invention, methods executed by allmesh stations in a wireless mesh network are the same. Therefore, inthis embodiment of the present invention, only one mesh station, thatis, the first mesh station, in the wireless mesh network is used as anexample for description.

A frame header of the first data frame in this embodiment of the presentinvention includes a destination address of the first data frame.

In this embodiment of the present invention, a data frame may not needto be propagated in the entire wireless mesh network. However, when thedata frame is a broadcast data frame, a multicast data frame, or anunknown unicast data frame, the data frame may be propagated in theentire wireless mesh network. Consequently, a loop is formed in anetwork including the wireless mesh network and an external network. Abroadcast data frame means that a destination address of the data frameis a broadcast address. A multicast data frame means that a destinationaddress of the data frame is a multicast address. An unknown unicastdata frame means that a destination address of the data frame is aunicast address, and the unicast address does not exist in a MACforwarding table of the first mesh station. For an unknown unicast dataframe, because the first mesh station cannot obtain a path forforwarding the data frame, the first mesh station generally broadcaststhe data frame.

A destination address is stored in different fields of a data frame indifferent cases. For example, the destination address may be in anaddress 1, an address 3, or an address 5 of a MAC header of a WLANframe; may be in a frame header of an aggregate MAC service data unit(A-MSDU) subframe of a WLAN frame; or may be in a MAC header of anEthernet frame. The Ethernet frame is encapsulated in a frame body of aWLAN frame.

In this embodiment of the present invention, the transmitter address(TA) of the first data frame is the MAC address of the second meshstation. The transmitter address may be an address 2 of a MAC header ofa WLAN frame.

The first mesh station belongs to the first mesh gate, and the secondmesh station belongs to the second mesh gate. For example, as shown inFIG. 2, assuming that the first mesh station is a station 3, the secondmesh station may be a station 2 or a station 4. The station 3 and astation 1 belong to a gateway 1, and the station 2 and the station 4belong to a gateway 2. The station 3, the station 1, and the gateway 1may be considered as a subnet, such as a subnet 1. The station 2, thestation 4, and the gateway 2 may be considered as a subnet, such as asubnet 2. The subnet mentioned in this embodiment of the presentinvention is different from an IP subnet in the Internet Protocol (IP).In addition, the subnet mentioned in this embodiment of the presentinvention is also different from a virtual local area network (VLAN) inEthernet. The subnet mentioned in this embodiment of the presentinvention is a set of mesh stations that belong to a same mesh gate. Thesubnet is only used to separate a broadcast data frame, a multicast dataframe, or an unknown unicast data frame. The subnet does not separate aknown unicast data frame.

S102. The first mesh station determines that the first data frame is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe; determines, according to the MAC address of the second meshstation, that the first mesh station and the second mesh station belongto different mesh gates; and discards the first data frame.

The first data frame includes the destination address of the first dataframe. Specifically, after receiving the first data frame sent by thesecond mesh station, the first mesh station may determine, according tothe destination address of the first data frame, that the first dataframe is a broadcast data frame, a multicast data frame, or an unknownunicast data frame.

The first mesh station may determine, according to the MAC address ofthe second mesh station, that the first mesh station and the second meshstation belong to different mesh gates. Specifically, a method fordetermining, by the first mesh station according to the MAC address ofthe second mesh station, that the first mesh station and the second meshstation belong to different mesh gates is described in detail in thefollowing embodiment, and is not described herein again.

In this embodiment of the present invention, when determining that thefirst data frame that is sent by the second mesh station and received bythe first mesh station is a broadcast data frame, a multicast dataframe, or an unknown unicast data frame, and that the first mesh stationand the second mesh station belong to different mesh gates, the firstmesh station discards the first data frame, that is, the first meshstation does not process the first data frame.

In the method provided in this embodiment of the present invention, abroadcast data frame, a multicast data frame, or an unknown unicast dataframe is not propagated between mesh stations that belong to differentmesh gates. That is, the broadcast data frame, the multicast data frame,or the unknown unicast data frame is not propagated between differentsubnets, but is propagated only in a same subnet. Therefore, a loop in anetwork including a wireless mesh network and an external network can beavoided.

Based on the foregoing technical solution, on the one hand, when a firstdata frame that is received by a first mesh station and sent by a secondmesh station that belongs to a mesh gate different from that to whichthe first mesh station belongs is a broadcast data frame, a multicastdata frame, or an unknown unicast data frame, the first mesh stationdiscards the first data frame, that is, the first mesh station does notprocess the first data frame, so that the first data frame is notpropagated between different mesh gates. Therefore, a loop in a networkincluding a wireless mesh network and an external network can beavoided. On the other hand, in this embodiment of the present invention,because there is still a first mesh gate and a second mesh gate, and aquantity of mesh gates in the wireless mesh network is not reduced,congestion at the mesh gate can be prevented. Therefore, in thisembodiment of the present invention, congestion at the mesh gate can beprevented while a loop is avoided. In addition, after passing throughthe external network connected to the wireless mesh network, a broadcastdata frame, a multicast data frame, and an unknown unicast data framethat are in a subnet in which a gateway 1 in the wireless mesh networkis located eventually return to a subnet in which a gateway 2 islocated. Therefore, it is ensured that the broadcast data frame, themulticast data frame, and the unknown unicast data frame are propagatedin the entire wireless mesh network without causing a loop.

Optionally, with reference to FIG. 3, as shown in FIG. 4, before S101,the method for transmitting data in a wireless mesh network provided inthis embodiment of the present invention may further include thefollowing steps.

S103. The first mesh station receives a management frame sent by thesecond mesh station, where a transmitter address of the management frameis the MAC address of the second mesh station, and the management frameincludes an identifier of the second mesh gate.

The management frame may be a beacon frame. The second mesh stationperiodically sends the beacon frame. The beacon frame includes anidentifier of a mesh gate (for example, the second mesh gate) to whichthe second mesh station belongs. Because the beacon frame isperiodically sent by the second mesh station, when the mesh gate towhich the second mesh station belongs changes, each neighboring stationof the second mesh station may update the mesh gate to which the secondmesh station belongs.

Optionally, the management frame may be a probe response frame. Theprobe response frame includes an identifier of a mesh gate (for example,the second mesh gate) to which the second mesh station belongs. Afterreceiving a probe request frame, the second mesh station sends a proberesponse frame in response to the probe request frame. The proberesponse frame may include the identifier of the mesh gate to which thesecond mesh station belongs. Because a beacon frame is periodicallysent, there is a specific time interval between two times of sending. Ifa probe response frame includes an identifier of a mesh gate to which atransmitter (for example, the second mesh station) of the probe responseframe belongs, a receiver (for example, the first mesh station) of theprobe response frame may not need to learn, only when the transmittersends the beacon frame next time, the mesh gate to which the transmitterbelongs. That is, the receiver of the probe response frame can learn, ina timely manner, the mesh gate to which the transmitter of the proberesponse frame belongs. In this way, a waiting time of a neighboringstation of the second mesh station can be reduced.

The identifier of the second mesh gate may be a MAC address of thesecond mesh gate.

In this embodiment of the present invention, an extension field may beadded to the management frame to store an identifier of a mesh gate towhich a mesh station belongs. Specifically, the extension field may beadded to a frame header of the management frame to store the identifierof the mesh gate to which the mesh station belongs. For example, thesecond mesh station may add the extension field to the frame header ofthe management frame sent by the second mesh station, to store theidentifier of the mesh gate to which the second mesh station belongs,that is, the identifier of the second mesh gate.

S104. The first mesh station obtains a correspondence between the secondmesh station and the second mesh gate.

In this embodiment of the present invention, a method for obtaining, bythe first mesh station, the correspondence between the second meshstation and the second mesh gate may be one of the following.

(1) The method for obtaining, by the first mesh station, thecorrespondence may be: recording, by the first mesh station, a mappingfrom the second mesh station to the second mesh gate.

For example, the mapping from the second mesh station to the second meshgate may be a mapping from the MAC address of the second mesh station tothe MAC address of the second mesh gate.

(2) The method for obtaining, by the first mesh station, thecorrespondence may be: adding, by the first mesh station, the secondmesh station to a first set as an element of the first set. The firstset includes all mesh stations that belong to a mesh gate different fromthat to which the first mesh station belongs and that are known to thefirst mesh station.

For example, the first set includes MAC addresses of all the meshstations that belong to the mesh gate different from that to which thefirst mesh station belongs and that are known to the first mesh station.Elements of the first set are the MAC addresses of all the mesh stationsthat belong to the mesh gate different from that to which the first meshstation belongs and that are known to the first mesh station.

The adding, by the first mesh station, the second mesh station to afirst set as an element of the first set may be: adding, by the firstmesh station, the MAC address of the second mesh station to the firstset as an element of the first set.

(3) The method for obtaining, by the first mesh station, thecorrespondence may be: maintaining, by the first mesh station, a secondset. The second set includes all mesh stations that belong to a samemesh gate as the first mesh station and that are known to the first meshstation.

For example, the second set includes MAC addresses of all the meshstations that belong to the same mesh gate as the first mesh station andthat are known to the first mesh station. Elements of the second set arethe MAC addresses of all the mesh station that belong to the same meshgate as the first mesh station and that are known to the first meshstation.

Because the first mesh station and the second mesh station belong todifferent mesh gates, the first mesh station does not add the secondmesh station to the second set.

(4) The first mesh station may maintain both a first set and a secondset. The first mesh station adds the second mesh station to the firstset as an element of the first set, and does not add the second meshstation to the second set.

As shown in FIG. 4, S102 may specifically include the following steps.

S102 a. The first mesh station determines that the first data frame is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe.

S102 b. The first mesh station determines, according to the MAC addressof the second mesh station and the correspondence between the secondmesh station and the second mesh gate, that the first mesh station andthe second mesh station belong to different mesh gates.

If the method for obtaining, by the first mesh station, thecorrespondence between the second mesh station and the second mesh gateis (1), the first mesh station may determine, according to the MACaddress of the second mesh station and the mapping recorded by the firstmesh station, that the second mesh station belongs to the second meshgate, so as to determine that the first mesh station and the second meshstation belong to different mesh gates.

If the method for obtaining, by the first mesh station, thecorrespondence between the second mesh station and the second mesh gateis (2), the first mesh station may search the first set for the MACaddress of the second mesh station. If the MAC address of the secondmesh station exists in the first set, the first mesh station determinesthat the first mesh station and the second mesh station belong todifferent mesh gates.

If the method for obtaining, by the first mesh station, thecorrespondence between the second mesh station and the second mesh gateis (3), the first mesh station may search the second set for the MACaddress of the second mesh station. If the MAC address of the secondmesh station does not exist in the second set, the first mesh stationdetermines that the first mesh station and the second mesh stationbelong to different mesh gates.

If the method for obtaining, by the first mesh station, thecorrespondence between the second mesh station and the second mesh gateis (4), the first mesh station may search the first set and the secondset for the MAC address of the second mesh station. If the MAC addressof the second mesh station exists in the first set, the first meshstation determines that the first mesh station and the second meshstation belong to different mesh gates.

A method for determining, by the first mesh station, that the first meshstation and the second mesh station belong to different mesh gates maybe properly adjusted according to the method for obtaining, by the firstmesh station, the correspondence between the second mesh station and thesecond mesh gate.

S102 c. The first mesh station discards the first data frame.

When determining that the first data frame is a broadcast data frame, amulticast data frame, or an unknown unicast data frame, and that thefirst mesh station and the second mesh station belong to different meshgates, the first mesh station discards the first data frame, that is,the first mesh station does not process the first data frame.

In this embodiment of the present invention, a first mesh stationdetermines that a first data frame received by the first mesh station isa broadcast data frame, a multicast data frame, or an unknown unicastdata frame, and that the first mesh station and a second mesh stationthat sends the first data frame belong to different mesh gates, so thatthe first data frame can be controlled to be propagated only in a samesubnet (including a same gateway), but not between different subnets(including different mesh gates). Therefore, a loop in a networkincluding a wireless mesh network and an external network can beavoided.

Optionally, with reference to FIG. 3, as shown in FIG. 5, before S101,the method for transmitting data in a wireless mesh network provided inthis embodiment of the present invention may further include thefollowing steps.

S105. The first mesh station determines a minimum overhead between thefirst mesh station and each of multiple mesh gates, where the multiplemesh gates include the first mesh gate and the second mesh gate.

S106. The first mesh station selects the first mesh gate as a mesh gateto which the first mesh station belongs, where among the multiple meshgates an overhead between the first mesh gate and the first mesh stationis the minimum overhead.

In this embodiment of the present invention, each of the multiple meshgates is a mesh gate in a mesh network in which the first mesh stationand the second mesh station are located.

“Multiple” in this embodiment of the present invention refers to two ormore. For example, multiple mesh gates refer to two or more mesh gates.

In S105, an implementation manner of determining, by the first meshstation, the minimum overhead between the first mesh station and each ofthe multiple mesh gates is not specifically limited in this embodimentof the present invention, and may be specifically implemented bymanufacturers according to different needs of the manufacturers.

To describe more clearly the determining, by the first mesh station, theminimum overhead between the first mesh station and each of the multiplemesh gates, this embodiment of the present invention uses a possibleimplementation manner as an example to illustrate a method fordetermining, by the first mesh station, the minimum overhead between thefirst mesh station and each of the multiple mesh gates.

In the implementation manner provided in this embodiment of the presentinvention, one piece of indication information may be included in themanagement frame mentioned in S103. The indication information may beused to indicate a minimum overhead between the second mesh station thatsends the management frame and the second mesh gate to which the secondmesh station belongs.

After the first mesh station is powered on, the first mesh stationstarts to receive multiple management frames sent by multipleneighboring stations (for example, the second mesh station and a thirdmesh station) of the first mesh station. Each of the multiple managementframes includes one piece of indication information. The indicationinformation may be used to indicate a minimum overhead between aneighboring station that sends the management frame and a mesh gate towhich the neighboring station belongs. The mesh gate to which theneighboring station belongs is one of the multiple mesh gates.

Optionally, the indication information included in each of themanagement frames includes at least one of a received signal strengthindication (RSSI) or a path. The RSSI may be used to indicate a maximumreceived signal strength in a shortest path between the neighboringstation that sends the management frame and the mesh gate to which theneighboring station belongs. The maximum received signal strength is thelargest one of all received signal strengths between any two stations ofstations between the neighboring station and the mesh gate to which theneighboring station belongs and between a station and the mesh gate. Thepath is used to indicate the shortest path between the neighboringstation that sends the management frame and the mesh gate to which theneighboring station belongs.

For example, assuming that a neighboring station of the first meshstation is a station B, a mesh gate to which the station B belongs is agateway K, and a shortest path between the station B and the gateway Kpasses through three stations: sequentially a station C, a station D,and a station E, the shortest path between the station B and the gatewayK is: the station B—the station C—the station D—the station E—thegateway K. If a management frame starts to be sent from the gateway K,all received signal strengths between any two stations of the stationsbetween the neighboring station and the mesh gate to which theneighboring station belongs and between a station and the gatewayinclude: a signal strength (marked as a received signal strength EK) atwhich the station E receives the management frame sent by the gateway K,a signal strength (marked as a received signal strength DE) at which thestation D receives the management frame sent by the station E, a signalstrength (marked as a received signal strength CD) at which the stationC receives the management frame sent by the station D, and a signalstrength (marked as a received signal strength BC) at which the stationB receives the management frame sent by the station C. A maximumreceived signal strength is the largest one of the received signalstrength EK, the received signal strength DE, the received signalstrength CD, or the received signal strength BC.

In this embodiment of the present invention, after receiving amanagement frame sent by a neighboring station, each mesh station maycompare a signal strength, at which the mesh station receives themanagement frame, with a received signal strength (which is specificallya maximum received signal strength indicated by a received signalstrength indication) included in the management frame, use the largerone as a maximum received signal strength, and add the maximum receivedsignal strength to the management frame of the mesh station for sending.

When the mesh station receives multiple management frames sent bymultiple neighboring stations that belong to a same mesh gate, the meshstation may obtain multiple received signal strengths after performingcomparison according to the foregoing method. Then, the mesh station mayselect the largest one from the multiple received signal strengths as amaximum received signal strength, and add the maximum received signalstrength to the management frame of the mesh station for sending.

In the method for transmitting data in a wireless mesh network providedin this embodiment of the present invention, after receiving amanagement frame sent by a neighboring station of each mesh station, themesh station obtains indication information included in the managementframe. Therefore, after receiving management frames sent by multipleneighboring stations of a first mesh station, the first mesh station mayobtain multiple pieces of indication information by obtaining indicationinformation included in each management frame.

After obtaining the multiple pieces of indication information, the firstmesh station may determine minimum overheads between the first meshstation and the multiple mesh gates according to the multiple pieces ofindication information. The minimum overheads between the first meshstation and the multiple mesh gates are minimum overheads between thefirst mesh station and all of the multiple mesh gates.

It may be understood that although some neighboring stations may belongto a same mesh gate, shortest paths between these neighboring stationsand the mesh gate may be different. Therefore, minimum overheads thatare between the first mesh station and the mesh gate and that aredetermined by the first mesh station according to indication informationin management frames sent by these neighboring stations may also bedifferent.

For example, as shown in FIG. 2, both the station 2 and the station 4belong to the gateway 2, that is, the station 2 and the station 4 belongto a same mesh gate. However, a management frame sent by the gateway 2can arrive at the station 2 directly, but the management frame sent bythe gateway 2 needs to pass through the station 2 to arrive at thestation 4. Therefore, if the first mesh station is the station 3, aminimum overhead that is between the station 3 and the gateway 2 andthat is determined by the station 3 according to indication informationin a management frame sent by the station 2 is marked as an overhead 1,and a minimum overhead that is between the station 3 and the gateway 2and that is determined by the station 3 according to indicationinformation in a management frame sent by the station 4 is marked as anoverhead 2, the overhead 1 is less than the overhead 2, and therefore,the station 3 may determine that a minimum overhead between the station3 and the gateway 2 is the overhead 1.

The foregoing descriptions of the minimum overhead between the station 3and the gateway 2 are merely illustrative descriptions of an overheadbetween one mesh station and one mesh gate, and do not set anylimitation to the present invention. In actual application, fordifferent mesh gates, such as the gateway 1 and the gateway 2, thestation 3 needs to select, from the gateway 1 and the gateway 2, agateway as a mesh gate of the station 3, where among the different meshgates an overhead between the mesh gate and the station 3 is the minimumoverhead. For example, a minimum overhead between the station 3 and thegateway 1 may be less than a minimum overhead between the station 3 andthe gateway 2, and therefore, the station 3 may select the gateway 1 asthe mesh gate of the station 3.

A larger value of the maximum received signal strength indicates asmaller overhead between the neighboring station and the mesh gate towhich the neighboring station belongs, that is, a smaller overheadbetween the first mesh station and the mesh gate. On the contrary, asmaller value of the maximum received signal strength indicates a largeroverhead between the neighboring station and the gateway to which theneighboring station belongs, that is, a larger overhead between thefirst mesh station and the mesh gate.

A smaller value of the shortest path indicates a smaller overheadbetween the neighboring station and the mesh gate, that is, a smalleroverhead between the first mesh station and the mesh gate. On thecontrary, a larger value of the shortest path indicates a largeroverhead between the neighboring station and the mesh gate, that is, alarger overhead between the first mesh station and the mesh gate.

The path may also be understood as a distance. For example, a shortestpath between any two stations may also be understood as a shortestdistance between the any two stations.

With reference to the received signal strength indication and the path,when maximum received signal strengths that are sent by severalneighboring stations and received by the first mesh station are equal,the first mesh station may further determine, from these neighboringstations, a neighboring station that has the shortest one of shortestpaths between these neighboring stations and mesh gates to which theseneighboring stations belong. Assuming that a mesh gate to which theneighboring station belongs is the first mesh gate, among the multiplemesh gates an overhead between the first mesh gate and the first meshstation is the minimum overhead.

Correspondingly, when determining that shortest paths between severalneighboring stations and mesh gates to which the neighboring stationsbelong are equal, the first mesh station may further determine, fromthese neighboring stations, a neighboring station that has the largestone of maximum received signal strengths sent by these neighboringstations. Assuming that a mesh gate to which the neighboring stationbelongs is the first mesh gate, an overhead between the first mesh gateand the first mesh station is the minimum overhead.

In conclusion, with reference to the received signal strength indicationand the path, the first mesh station may select, from the multiple meshgates, the first mesh gate as the mesh gate of the first mesh station,where among the multiple mesh gates an overhead between the first meshgate and the first mesh station is the minimum overhead.

Optionally, in actual application, if overheads between two or more meshgates and the first mesh station are the minimum, and the two or moremesh gates are determined by the first mesh station with reference tothe maximum received signal strength indication and the path, the firstmesh station may randomly select one gateway from the mesh gates as themesh gate of the first mesh station. The present invention sets nospecific limitation thereto.

Optionally, that the first mesh station selects the first mesh gate asthe mesh gate of the first mesh station may be understood as follows:The first mesh station configures an address of the mesh gate of thefirst mesh station as an identifier of the first mesh gate (in actualapplication, generally, an identifier of a mesh gate is a MAC address ofthe mesh gate).

In this embodiment of the present invention, each mesh station in awireless mesh network can select a mesh gate as a mesh gate of the meshstation, where an overhead between the mesh gate and the mesh station isthe minimum overhead. Because each mesh station can dynamically select amesh gate as a mesh gate of the mesh station, where an overhead betweenthe mesh gate and the mesh station is the minimum overhead, all the meshstations may select different mesh gates, so that balance among multiplemesh gates can be achieved, and congestion at the mesh gate can beprevented.

Further, each mesh station selects, according to indication informationin a management frame sent by a neighboring station of the mesh station,a mesh gate as a mesh gate of the mesh station, where an overheadbetween the mesh gate and the mesh station is the minimum overhead.Therefore, a path that is from each mesh station to a mesh gate selectedby the mesh station and that passes through mesh stations (including theneighboring station that sends the management frame, and stations in ashortest path between the neighboring station and the mesh gate) is alsothe shortest one of all paths between the mesh station and the mesh gateselected by the mesh station.

For example, as shown in FIG. 2, because the station 3 selects thegateway 1 as a gateway of the station 3, a path that is from the station3 to the gateway 1 and that passes through the station 1 is also theshortest one of all paths between the station 3 and the gateway 1. Allthe paths between the station 3 and the gateway 1 include: the station3—the station 1—the gateway 1; the station 3—the station 1—the station2—the gateway 1; the station 3—the station 2—the gateway 1; the station3—the station 2—the station 1—the gateway 1; the station 3—the station4—the station 2—the gateway 1; and the station 3—the station 4—thestation 2—the station 1—the gateway 1.

In the method for transmitting data in a wireless mesh network providedin this embodiment of the present invention, each mesh station in awireless mesh network can select, from multiple mesh gates in thewireless mesh network, a mesh gate as a mesh gate of the mesh station,where an overhead between the mesh gate and the mesh station is theminimum overhead. Therefore, in the wireless mesh network, mesh stationsthat select a same mesh gate can form a subnet, so that the wirelessmesh network is logically divided into multiple subnets.

It may be understood that in this embodiment of the present invention, amesh station may receive a management frame sent by each neighboringstation of the mesh station, and the mesh station may also send amanagement frame to each neighboring station of the mesh station. Theneighboring stations of the mesh station include all stations that havea mesh peering with the mesh station.

Optionally, with reference to FIG. 3, as shown in FIG. 6, the method fortransmitting data in a wireless mesh network provided in this embodimentof the present invention may further include the following steps.

S107. The first mesh station receives a second data frame sent by athird mesh station, where a transmitter address of the second data frameis a MAC address of the third mesh station, and the third mesh stationbelongs to the first mesh gate.

The first mesh station and the third mesh station are two mesh stationsin the wireless mesh network. The first mesh station and the third meshstation are neighboring stations that have a mesh peering with eachother. The third mesh station may be an AP. For descriptions of the meshpeering, specifically refer to the related descriptions of the meshpeering in S101 in the foregoing embodiment. Details are not describedherein again.

In this embodiment of the present invention, because the first meshstation and the third mesh station belong to a same mesh gate, it may beconsidered that the first mesh station and the third mesh station belongto a same subnet.

For example, as shown in FIG. 2, assuming that the first mesh station isthe station 3, the third mesh station may be the station 1. Because thestation 3 and the station 1 belong to a same mesh gate, that is, thegateway 1, it may be considered that the station 3, the station 1, andthe gateway 1 belong to a same subnet, such as the subnet 1.

A frame header of the second data frame in this embodiment of thepresent invention includes a destination address of the second dataframe.

For descriptions of the transmitter address of the second data frame,specifically refer to the related descriptions of the transmitteraddress of the first data frame in S101 in the foregoing embodiment.Details are not described herein again.

S108. The first mesh station determines that the second data frame is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe; determines, according to the MAC address of the third meshstation, that the first mesh station and the third mesh station belongto a same mesh gate; and processes the second data frame.

For descriptions of the broadcast data frame, the multicast data frame,and the unknown unicast data frame, specifically refer to the relateddescriptions of the broadcast data frame, the multicast data frame, andthe unknown unicast data frame in S101 in the foregoing embodiment.Details are not described herein again.

In this embodiment of the present invention, the processing, by thefirst mesh station, the second data frame includes: forwarding, by thefirst mesh station, the second data frame.

In this embodiment of the present invention, when determining, accordingto the destination address of the second data frame that is sent by thethird mesh station and received by the first mesh station, that thesecond data frame is a broadcast data frame, a multicast data frame, oran unknown unicast data frame, and determining, according to the MACaddress of the third mesh station, that the first mesh station and thethird mesh station belong to a same mesh gate, the first mesh stationprocesses the second data frame.

In the method provided in this embodiment of the present invention, afirst mesh station discards a broadcast data frame, a multicast dataframe, or an unknown unicast data frame sent by a second mesh station(the second mesh station and the first mesh station belong to differentmesh gates), and the first mesh station processes a broadcast dataframe, a multicast data frame, or an unknown unicast data frame sent bya third mesh station (the third mesh station and the first mesh stationbelong to a same mesh gate). Therefore, the broadcast data frame, themulticast data frame, or the unknown unicast data frame in thisembodiment of the present invention is not propagated between differentsubnets (all mesh stations in one subnet belong to a same mesh gate),but is propagated only in a same subnet. Therefore, a loop in a networkincluding a wireless mesh network and an external network can beavoided.

In this embodiment of the present invention, for descriptions of thesubnet, specifically refer to the related descriptions of the subnet inS101 in the foregoing embodiment. Details are not described hereinagain.

In this embodiment of the present invention, an execution order of S101and S102, and S107 and S108 is not limited. That is, in this embodimentof the present invention, S101 and S102 may be performed before S107 andS108, or S107 and S108 may be performed before S101 and S102, or S101and S102, and S107 and S108 may be performed simultaneously.

Optionally, with reference to FIG. 3, as shown in FIG. 7, the method fortransmitting data in a wireless mesh network provided in this embodimentof the present invention may further include the following steps.

S109. The first mesh station receives a third data frame sent by thesecond mesh station, where a transmitter address of the third data frameis the MAC address of the second mesh station.

S110. The first mesh station determines that the third data frame is aknown unicast data frame, and forwards the third data frame.

In this embodiment of the present invention, when determining that thethird data frame sent by the second mesh station is a known unicast dataframe, the first mesh station needs to forward the third data frame.That is, in the method for transmitting data in a wireless mesh networkprovided in this embodiment of the present invention, a known unicastdata frame is still transmitted according to a conventional technology,and transmission of the known unicast data frame is not affected.

A known unicast data frame means that a destination address of the dataframe is a unicast address, and the unicast address exists in the MACforwarding table of the first mesh station.

In this embodiment of the present invention, an execution order of S101and S102, and S109 and S110 is not limited. That is, in this embodimentof the present invention, S101 and S102 may be performed before S109 andS110, or S109 and S110 may be performed before S101 and

S102, or S101 and S102, and S109 and S110 may be performedsimultaneously.

Optionally, with reference to FIG. 3, as shown in FIG. 8, the method fortransmitting data in a wireless mesh network provided in this embodimentof the present invention may further include the following step.

S111. The first mesh station determines that a receiver address of ato-be-sent fourth data frame is the MAC address of the second meshstation, determines that the fourth data frame is a broadcast data frameor a multicast data frame, and skips sending the fourth data frame.

In the method for transmitting data in a wireless mesh network providedin this embodiment of the present invention, when determining that areceiver address of a to-be-sent broadcast data frame or multicast dataframe is a MAC address of a second mesh station that belongs to a meshgate different from that to which a first mesh station belongs, thefirst mesh station may not send the broadcast data frame or themulticast data frame to the second mesh station. In this way, the firstmesh station sends, to a third mesh station that belongs to a same meshgate as the first mesh station, a to-be-sent broadcast data frame ormulticast data frame only when a receiver address of the broadcast dataframe or the multicast data frame is a MAC address of the third meshstation. In this way, a transmitter can control a broadcast data frameor a multicast data frame to be propagated only in a same subnet, butnot between different subnets. This optional solution can reduce airinterface resources used for data frame transmission.

If the fourth data frame is sent in a form of an A-MSDU subframe, thereceiver address of the fourth data frame refers to a receiver addressin a MAC header of an A-MSDU frame including the A-MSDU subframe. Theskipping sending the fourth data frame means removing the A-MSDUsubframe from the A-MSDU frame.

In this embodiment of the present invention, an execution order of S101and S102, and S111 is not limited. That is, in this embodiment of thepresent invention, S101 and S102 may be performed before S111, or S111may be performed before S101 and S102, or S101 and S102, and S111 may beperformed simultaneously.

Optionally, because a management frame needs to be propagated in theentire wireless mesh network, after receiving a management frame, eachmesh station in the wireless mesh network processes the management framereceived by the mesh station. For example, each mesh station in thewireless mesh network responds to the management frame received by themesh station.

Optionally, because management frames may be continuously transmittedbetween mesh stations, each mesh station may determine an overheadbetween the mesh station and each mesh gate in real time according toindication information included in management frames received by themesh station, and select a mesh gate as a mesh gate of the mesh station,where an overhead between the mesh gate and the mesh station is theminimum overhead. In this method, each mesh station can dynamicallyselect a mesh gate as a mesh gate of the mesh station, where an overheadbetween the mesh gate and the mesh station is the minimum overhead, soas to better achieve balance among mesh gates and prevent congestion atthe mesh gate.

Further, when a mesh gate is faulty or a location of a mesh gate/meshstation changes, in the foregoing method of selecting, by a meshstation, a mesh gate in real time, each mesh station can select, in realtime, a mesh gate as a mesh gate of the mesh station, where an overheadbetween the mesh gate and the mesh station is the minimum overhead. Forexample, a mesh station can switch from an originally selected mesh gateto a newly selected mesh gate in real time, so that it is ensured that aservice transmitted by each mesh station is not interrupted.

The accompanying drawings in the foregoing embodiment are merely forillustrative descriptions of the method for transmitting data in awireless mesh network in this embodiment of the present invention, andare not intended to limit this embodiment of the present invention. Thatis, this embodiment of the present invention includes but is not limitedto the accompanying drawings in the foregoing embodiment. Any otheraccompanying drawings that can be obtained from the technicalsolutions/accompanying drawings of this embodiment of the presentinvention shall fall within the protection scope of this embodiment ofthe present invention.

In the method for transmitting data in a wireless mesh network providedin this embodiment of the present invention, on the one hand, because amanagement frame can be transmitted in an entire wireless mesh network,it can be ensured that all mesh stations in the entire wireless meshnetwork can receive the management frame. On the other hand, because abroadcast data frame, a multicast data frame, or an unknown unicast dataframe is propagated only in a same subnet, but not between differentsubnets, a case in which all the mesh stations in the entire wirelessmesh network can receive the broadcast data frame, the multicast dataframe, or the unknown unicast data frame can be avoided, that is, a datastorm can be avoided. Therefore, a loop in a network including thewireless mesh network and an external network can be avoided.

In the method for transmitting data in a wireless mesh network providedin this embodiment of the present invention, on the one hand, when afirst data frame that is received by a first mesh station and sent by asecond mesh station that belongs to a mesh gate different from that towhich the first mesh station belongs is a broadcast data frame, amulticast data frame, or an unknown unicast data frame, the first meshstation discards the first data frame, that is, the first mesh stationdoes not process the first data frame, so that the first data frame isnot propagated between different mesh gates. Therefore, a loop in anetwork including a wireless mesh network and an external network can beavoided. On the other hand, because there is still a first mesh gate anda second mesh gate, and a quantity of mesh gates in the wireless meshnetwork is not reduced, congestion at the mesh gate can be prevented.Therefore, in this embodiment of the present invention, congestion atthe mesh gate can be prevented while a loop is avoided.

Embodiment 2

As shown in FIG. 9, this embodiment of the present invention provides astation. The station is a mesh station supporting a mesh function, themesh station is a first mesh station, and the first mesh stationincludes:

a receiving unit 10, configured to receive a first data frame sent by asecond mesh station, where a transmitter address of the first data frameis a MAC address of the second mesh station, the first mesh stationbelongs to a first mesh gate, and the second mesh station belongs to asecond mesh gate; a determining unit 11, configured to: determine thatthe first data frame received by the receiving unit 10 is a broadcastdata frame, a multicast data frame, or an unknown unicast data frame;and determine, according to the MAC address of the second mesh stationthat is received by the receiving unit 10, that the first mesh stationand the second mesh station belong to different mesh gates; and aprocessing unit 12, configured to discard, according to the resultdetermined by the determining unit 11, the first data frame received bythe receiving unit 10.

Optionally, with reference to FIG. 9, as shown in FIG. 10, the firstmesh station may further include an obtaining unit 13.

The receiving unit 10 is further configured to: before receiving thefirst data frame sent by the second mesh station, receive a managementframe sent by the second mesh station. A transmitter address of themanagement frame is the MAC address of the second mesh station, and themanagement frame includes an identifier of the second mesh gate. Theobtaining unit 13 is configured to obtain a correspondence between thesecond mesh station and the second mesh gate. The determining unit 11 isspecifically configured to determine, according to the MAC address ofthe second mesh station that is received by the receiving unit 10 andthe correspondence between the second mesh station and the second meshgate that is obtained by the obtaining unit 13, that the first meshstation and the second mesh station belong to different mesh gates.

Optionally, with reference to FIG. 10, as shown in FIG. 11, the firstmesh station further includes a selection unit 14.

The determining unit 11 is further configured to: before the receivingunit 10 receives the first data frame sent by the second mesh station,determine a minimum overhead between the first mesh station and each ofmultiple mesh gates. The multiple mesh gates include the first mesh gateand the second mesh gate. The selection unit 14 is configured to select,according to the minimum overhead that is between the first mesh stationand each of the multiple mesh gates and that is determined by thedetermining unit 11, the first mesh gate as a mesh gate to which thefirst mesh station belongs. Among the multiple mesh gates an overheadbetween the first mesh gate and the first mesh station is the minimumoverhead.

Optionally, the receiving unit 10 is further configured to receive asecond data frame sent by a third mesh station. A transmitter address ofthe second data frame is a MAC address of the third mesh station, andthe third mesh station belongs to the first mesh gate. The determiningunit 11 is further configured to: determine that the second data framereceived by the receiving unit 10 is a broadcast data frame, a multicastdata frame, or an unknown unicast data frame; and determine, accordingto the MAC address of the third mesh station that is received by thereceiving unit 10, that the first mesh station and the third meshstation belong to a same mesh gate. The processing unit 12 is furtherconfigured to process, according to the result determined by thedetermining unit 11, the second data frame received by the receivingunit 10.

Optionally, the receiving unit 10 is further configured to receive athird data frame sent by the second mesh station. A transmitter addressof the third data frame is the MAC address of the second mesh station.The determining unit 11 is further configured to determine that thethird data frame received by the receiving unit 10 is a known unicastdata frame. The processing unit 12 is further configured to forward thethird data frame according to the result determined by the determiningunit 11.

Optionally, the determining unit 11 is further configured to: determinethat a receiver address of a to-be-sent fourth data frame is the MACaddress of the second mesh station, and determine that the fourth dataframe is a broadcast data frame or a multicast data frame. Theprocessing unit 12 is further configured to skip sending the fourth dataframe according to the result determined by the determining unit 11.

In this embodiment of the present invention, the stations, that is, thefirst mesh station, the second mesh station, and the third mesh stationall are mesh stations in a wireless mesh network. Both the first meshgate and the second mesh gate are mesh gates in the wireless meshnetwork. The first mesh station, the second mesh station, the third meshstation, the first mesh gate, and the second mesh gate may all be APs.

The first mesh station and the second mesh station are neighboringstations that have a mesh peering. The first mesh station and the thirdmesh station are also neighboring stations that have a mesh peering. Fordescriptions of the mesh peering, specifically refer to the relateddescriptions of the mesh peering in S101 in Embodiment 1. Details arenot described herein again.

For related descriptions of the broadcast data frame, the multicast dataframe, the unknown unicast data frame, the known unicast data frame,other terms involved when units of the mesh station implement theforegoing processes, and explanatory descriptions of the terms,specifically refer to the related descriptions in the steps of themethod embodiment shown in Embodiment 1. Details are not describedherein again.

“Multiple” in this embodiment of the present invention refers to two ormore. For example, multiple mesh gates refer to two or more mesh gates.

This embodiment of the present invention provides a station. The stationis a mesh station supporting a mesh function, and the mesh station is afirst mesh station. On the one hand, when a first data frame that isreceived by the first mesh station and sent by a second mesh stationthat belongs to a mesh gate different from that to which the first meshstation belongs is a broadcast data frame, a multicast data frame, or anunknown unicast data frame, the first mesh station discards the firstdata frame, that is, the first mesh station does not process the firstdata frame, so that the first data frame is not propagated betweendifferent mesh gates. Therefore, a loop in a network including awireless mesh network and an external network can be avoided. On theother hand, in this embodiment of the present invention, because thereis still a first mesh gate and a second mesh gate, and a quantity ofmesh gates in the wireless mesh network is not reduced, congestion atthe mesh gate can be prevented. Therefore, in this embodiment of thepresent invention, congestion at the mesh gate can be prevented while aloop is avoided.

Embodiment 3

This embodiment of the present invention provides a station. The stationis a mesh station supporting a mesh function, and the mesh station is afirst mesh station. The first mesh station includes a processor, atransceiver, and a memory. The processor, the transceiver, and thememory may be connected and communicate with each other by using asystem bus.

As shown in FIG. 12, FIG. 12 is a schematic hardware diagram of thestation (that is, the first station) according to this embodiment of thepresent invention. In FIG. 12, the processor 20, the transceiver 22, andthe memory 23 are connected and communicate with each other by using thesystem bus 21.

The processor 20 may be a central processing unit (CPU).

The memory 23 is configured to: store program code and transmit theprogram code to the processor 20. The processor 20 executes thefollowing instructions according to the program code. The memory 23 mayinclude a volatile memory, such as a random-access memory (RAM). Thememory 23 may include a nonvolatile memory, such as a read-only memory(ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive(SSD). The memory 23 may include a combination of the foregoing types ofmemories. The processor 20, the memory 23, and the transceiver 22 areconnected and communicate with each other by using the system bus 21.

The transceiver 22 may be a wireless transceiver. For example, thewireless transceiver may be a wireless network interface controller(WNIC). The wireless transceiver may be a signal processing chip with awireless transceiver function. The wireless transceiver may be aunit/module that has a wireless transceiver function and that includes asignal processing chip without a wireless transceiver function, anantenna, an antenna feeder, and the like. The wireless transceiver maybe another unit/module or the like that can implement a wirelesstransceiver function.

When the station is running, the processor 20 runs an executioninstruction of the station, so as to execute the method proceduredescribed in any one of FIG. 3 to FIG. 8. Details include the following.

The transceiver 22 is configured to receive a first data frame sent by asecond mesh station. A transmitter address of the first data frame is aMAC address of the second mesh station. The first mesh station belongsto a first mesh gate, and the second mesh station belongs to a secondmesh gate. The processor 20 is configured to: determine that the firstdata frame received by the transceiver 22 is a broadcast data frame, amulticast data frame, or an unknown unicast data frame; determine,according to the MAC address of the second mesh station that is receivedby the transceiver 22, that the first mesh station and the second meshstation belong to different mesh gates; and discard the first data framereceived by the transceiver 22. The memory 23 is configured to store asoftware program that the processor 20 needs to execute to implement theforegoing processes, so that the processor 20 implements the foregoingprocesses by executing the software program stored in the memory 23.

Optionally, the transceiver 22 is further configured to: beforereceiving the first data frame sent by the second mesh station, receivea management frame sent by the second mesh station. A transmitteraddress of the management frame is the MAC address of the second meshstation, and the management frame includes an identifier of the secondmesh gate. The processor 20 is further configured to: obtain acorrespondence between the second mesh station and the second mesh gate;and determine, according to the MAC address of the second mesh stationthat is received by the transceiver 22 and the correspondence betweenthe second mesh station and the second mesh gate, that the first meshstation and the second mesh station belong to different mesh gates.

Optionally, the processor 20 is further configured to: before thetransceiver 22 receives the first data frame sent by the second meshstation, determine a minimum overhead between the first mesh station andeach of multiple mesh gates; and select, according to the minimumoverhead between the first mesh station and each of the multiple meshgates, the first mesh gate as a mesh gate to which the first meshstation belongs. The multiple mesh gates include the first mesh gate andthe second mesh gate. Among the multiple mesh gates an overhead betweenthe first mesh gate and the first mesh station is the minimum overhead.

Optionally, the transceiver 22 is further configured to receive a seconddata frame sent by a third mesh station. A transmitter address of thesecond data frame is a MAC address of the third mesh station, and thethird mesh station belongs to the first mesh gate. The processor 20 isfurther configured to: determine that the second data frame received bythe transceiver 22 is a broadcast data frame, a multicast data frame, oran unknown unicast data frame; determine, according to the MAC addressof the third mesh station that is received by the transceiver 22, thatthe first mesh station and the third mesh station belong to a same meshgate; and process the second data frame received by the transceiver 22.

Optionally, the transceiver 22 is further configured to receive a thirddata frame sent by the second mesh station. A transmitter address of thethird data frame is the MAC address of the second mesh station. Theprocessor 20 is further configured to: determine that the third dataframe received by the transceiver 22 is a known unicast data frame, andforward the third data frame received by the transceiver 22.

Optionally, the processor 20 is further configured to: determine that areceiver address of a to-be-sent fourth data frame is the MAC address ofthe second mesh station, determine that the fourth data frame is abroadcast data frame or a multicast data frame, and skip sending thefourth data frame.

In this embodiment of the present invention, the stations, that is, thefirst mesh station, the second mesh station, and the third mesh stationall are mesh stations in a wireless mesh network. Both the first meshgate and the second mesh gate are mesh gates in the wireless meshnetwork. The first mesh station, the second mesh station, the third meshstation, the first mesh gate, and the second mesh gate may all be APs.

The first mesh station and the second mesh station are neighboringstations that have a mesh peering. The first mesh station and the thirdmesh station are also neighboring stations that have a mesh peering. Fordescriptions of the mesh peering, specifically refer to the relateddescriptions of the mesh peering in S101 in Embodiment 1. Details arenot described herein again.

For related descriptions of the broadcast data frame, the multicast dataframe, the unknown unicast data frame, the known unicast data frame,other terms involved when units of the mesh station implement theforegoing processes, and explanatory descriptions of the terms,specifically refer to the related descriptions in the steps of themethod embodiment shown in Embodiment 1. Details are not describedherein again.

“Multiple” in this embodiment of the present invention refers to two ormore. For example, multiple mesh gates refer to two or more mesh gates.

This embodiment of the present invention provides a station. The stationis a mesh station supporting a mesh function, and the mesh station is afirst mesh station. On the one hand, when a first data frame that isreceived by the first mesh station and sent by a second mesh stationthat belongs to a mesh gate different from that to which the first meshstation belongs is a broadcast data frame, a multicast data frame, or anunknown unicast data frame, the first mesh station discards the firstdata frame, that is, the first mesh station does not process the firstdata frame, so that the first data frame is not propagated betweendifferent mesh gates. Therefore, a loop in a network including awireless mesh network and an external network can be avoided. On theother hand, in this embodiment of the present invention, because thereis still a first mesh gate and a second mesh gate, and a quantity ofmesh gates in the wireless mesh network is not reduced, congestion atthe mesh gate can be prevented. Therefore, in this embodiment of thepresent invention, congestion at the mesh gate can be prevented while aloop is avoided.

Embodiment 4

This embodiment of the present invention provides a WLAN mesh network(referred to as a wireless mesh network) system. The wireless meshnetwork system includes a first mesh station, a second mesh station, andmultiple mesh gates. The first mesh station may be the first meshstation described in Embodiment 2 or Embodiment 3.

“Multiple” in this embodiment of the present invention refers to two ormore. For example, multiple mesh gates refer to two or more mesh gates.

As shown in FIG. 2, FIG. 2 is a schematic architectural diagram of apossible wireless mesh network system according to an embodiment of thepresent invention. The wireless mesh network system includes two meshgates and multiple mesh stations. The two mesh gates are a gateway 1 anda gateway 2 respectively. The multiple mesh stations are a station 1, astation 2, a station 3, and a station 4 respectively. A first meshstation may be any mesh station (for example, the station 1, the station2, the station 3, or the station 4) in the multiple mesh stations.

In this embodiment of the present invention, the wireless mesh networksystem further includes a third mesh station. The first mesh station andthe third mesh station belong to a first mesh gate, and a second meshstation belongs to a second mesh gate. That is, the first mesh stationand the second mesh station belong to different mesh gates, and thefirst mesh station and the third mesh station belong to a same meshgate. The first mesh station and the second mesh station are neighboringstations that have a mesh peering. The first mesh station and the thirdmesh station are also neighboring stations in a mesh peering. Fordescriptions of the mesh peering, specifically refer to the relateddescriptions of the mesh peering in S101 in Embodiment 1. Details arenot described herein again.

In this embodiment of the present invention, for other descriptions ofthe first mesh station, interaction between the mesh stations in thewireless mesh network system, and the like, refer to the relateddescriptions in Embodiment 1, Embodiment 2, or Embodiment 3. Details arenot described herein again.

Mesh stations (for example, the first mesh station, the second meshstation, and the third mesh station) and mesh gates (for example, thefirst mesh gate and the second mesh gate) in this embodiment of thepresent invention may all be APs.

In the wireless mesh network system provided in this embodiment of thepresent invention, a first mesh station discards a broadcast data frame,a multicast data frame, or an unknown unicast data frame sent by asecond mesh station (the second mesh station and the first mesh stationbelong to different mesh gates), and the first mesh station processes abroadcast data frame, a multicast data frame, or an unknown unicast dataframe sent by a third mesh station (the third mesh station and the firstmesh station belong to a same mesh gate). Therefore, a broadcast dataframe, a multicast data frame, or an unknown unicast data frame is notpropagated between mesh stations that belong to different mesh gates.That is, the broadcast data frame, the multicast data frame, or theunknown unicast data frame is propagated only in a same subnet, but notbetween different subnets. Therefore, a loop in a network including awireless mesh network and an external network can be avoided.

In the wireless mesh network system provided in this embodiment of thepresent invention, when determining that a data frame, for example, athird data frame, sent by the second mesh station is a known unicastdata frame, the first mesh station needs to forward the third dataframe. That is, in this embodiment of the present invention, a knownunicast data frame is still transmitted according to a conventionaltechnology, and transmission of the known unicast data frame is notaffected.

In the wireless mesh network system provided in this embodiment of thepresent invention, because a management frame needs to be propagated inthe entire wireless mesh network, after receiving a management frame,each mesh station in the wireless mesh network processes the managementframe received by the mesh station. Therefore, it can be ensured thatthe management frame is propagated in the entire wireless mesh network.

This embodiment of the present invention provides a wireless meshnetwork system. The wireless mesh network system includes a first meshstation, a second mesh station, and multiple mesh gates. On the onehand, when a first data frame that is received by the first mesh stationand sent by the second mesh station that belongs to a mesh gatedifferent from that to which the first mesh station belongs is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe, the first mesh station discards the first data frame, that is,the first mesh station does not process the first data frame, so thatthe first data frame is not propagated between different mesh gates.Therefore, a loop in a network including a wireless mesh network and anexternal network can be avoided. On the other hand, in this embodimentof the present invention, because there is still a first mesh gate and asecond mesh gate, and a quantity of mesh gates in the wireless meshnetwork is not reduced, congestion at the mesh gate can be prevented.Therefore, in this embodiment of the present invention, congestion atthe mesh gate can be prevented while a loop is avoided.

It may be clearly understood by a person skilled in the art that, forthe purpose of convenient and brief description, division of theforegoing function modules is used as an example for illustration. Inactual application, the foregoing functions can be allocated to andimplemented by different function modules according to a requirement,that is, an inner structure of an apparatus is divided into differentfunction modules to implement all or some of the functions describedabove. For a detailed working process of the foregoing system,apparatus, and unit, refer to a corresponding process in the foregoingmethod embodiments. Details are not described herein again.

In the embodiments provided in this application, it should be understoodthat the disclosed system, apparatus, and method may be implemented inother manners. For example, the described apparatus embodiment is merelyan example. For example, the module or unit division is merely logicalfunction division and may be other division in actual implementation.For example, multiple units or components may be combined or integratedinto another system, or some features may be ignored or not performed.In addition, the displayed or discussed mutual couplings or directcouplings or communication connections may be indirect couplings orcommunication connections between some interfaces, apparatuses, orunits.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on multiplenetwork units. Some or all of the units may be selected according toactual needs to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of the presentinvention may be integrated into one processing unit, or each of theunits may exist alone physically, or two or more units are integratedinto one unit. The foregoing integrated unit may be implemented in aform of a software functional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a computer-readable storage medium.Based on such an understanding, the technical solutions or some of thetechnical solutions may be implemented in a form of a software product.The software product is stored in a storage medium, and includesinstructions for instructing a computer device (which may be a personalcomputer, a server, or a network device) or a processor to perform allor some of the steps of the methods described in the embodiments of thepresent invention. The storage medium is a non-transitory medium, andincludes various media capable of storing program code, such as a flashmemory, a removable hard disk, a read-only memory, a random accessmemory, a magnetic disk, or an optical disc.

The foregoing descriptions are merely specific implementation manners ofthe present invention, but are not intended to limit the protectionscope of the present invention. Any variation or replacement readilyfigured out by a person skilled in the art within the technical scopedisclosed in the present invention shall fall within the protectionscope of the present invention. Therefore, the protection scope of thepresent invention shall be subject to the protection scope of theclaims.

What is claimed is:
 1. A method for transmitting data in a wirelesslocal area network mesh network, wherein the method comprises:receiving, by a first mesh station, a first data frame sent by a secondmesh station, wherein a transmitter address of the first data frame is amedia access control (MAC) address of the second mesh station, whereinthe first mesh station belongs to a first mesh gate, and wherein thesecond mesh station belongs to a second mesh gate; and determining, bythe first mesh station, that the first data frame is a broadcast dataframe, a multicast data frame, or an unknown unicast data frame;determining, by the first mesh station according to the MAC address ofthe second mesh station, that the first mesh station and the second meshstation belong to different mesh gates; and in response to determiningthat the first data frame is a broadcast data frame, a multicast dataframe, or an unknown unicast data frame and that the first mesh stationand the second mesh station belong to different mesh gates, discarding,by the first mesh station, the first data frame.
 2. The method accordingto claim 1, wherein the method further comprises: receiving, by thefirst mesh station, a management frame sent by the second mesh station,wherein a transmitter address of the management frame is the MAC addressof the second mesh station, and wherein the management frame comprisesan identifier of the second mesh gate; and obtaining, by the first meshstation, a correspondence between the second mesh station and the secondmesh gate; and wherein the determining, by the first mesh stationaccording to the MAC address of the second mesh station, that the firstmesh station and the second mesh station belong to different mesh gatescomprises: determining, by the first mesh station according to the MACaddress of the second mesh station and the correspondence between thesecond mesh station and the second mesh gate, that the first meshstation and the second mesh station belong to different mesh gates. 3.The method according to claim 1, wherein the method further comprises:determining, by the first mesh station, a minimum overhead between thefirst mesh station and each of multiple mesh gates, wherein the multiplemesh gates comprise the first mesh gate and the second mesh gate; andselecting, by the first mesh station, the first mesh gate as a mesh gateto which the first mesh station belongs, wherein among the multiple meshgates an overhead between the first mesh gate and the first mesh stationis the minimum overhead.
 4. The method according to claim 1, wherein themethod further comprises: receiving, by the first mesh station, a seconddata frame sent by a third mesh station, wherein a transmitter addressof the second data frame is a MAC address of the third mesh station, andwherein the third mesh station belongs to the first mesh gate; anddetermining, by the first mesh station, that the second data frame is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe; determining, by the first mesh station according to the MACaddress of the third mesh station, that the first mesh station and thethird mesh station belong to a same mesh gate; and in response todetermining that the second data frame is a broadcast data frame, amulticast data frame, or an unknown unicast data frame and that thefirst mesh station and the third mesh station belong to a same meshgate, processing, by the first mesh station, the second data frame inresponse to the determinations.
 5. The method according to claim 1,wherein the method further comprises: receiving, by the first meshstation, a third data frame sent by the second mesh station, wherein atransmitter address of the third data frame is the MAC address of thesecond mesh station; and determining, by the first mesh station, thatthe third data frame is a known unicast data frame; and in response todetermining that the third data frame is a known unicast data frame,forwarding, by the first mesh station, the third data frame.
 6. Themethod according to claim 1, wherein the method further comprises:determining, by the first mesh station, that a receiver address of ato-be-sent fourth data frame is the MAC address of the second meshstation; determining, by the first mesh station, that the fourth dataframe is a broadcast data frame or a multicast data frame; and inresponse to determining that the receiver address of the to-be-sentfourth data frame is the MAC address of the second mesh station and thatthe fourth data frame is a broadcast data frame or a multicast dataframe, skipping, by the first mesh station, sending the fourth dataframe.
 7. A station, wherein the station is a mesh station supporting amesh function, the mesh station is a first mesh station, and the firstmesh station comprises: a transceiver, the transceiver configured toreceive a first data frame sent by a second mesh station, wherein atransmitter address of the first data frame is a media access control(MAC) address of the second mesh station, wherein the first mesh stationbelongs to a first mesh gate, and wherein the second mesh stationbelongs to a second mesh gate; and at least one processor, the at leastone processor configured to: determine that the first data frame is abroadcast data frame, a multicast data frame, or an unknown unicast dataframe; determine, according to the MAC address of the second meshstation, that the first mesh station and the second mesh station belongto different mesh gates; and in response to determining that the firstdata frame is a broadcast data frame, a multicast data frame, or anunknown unicast data frame and that the first mesh station and thesecond mesh station belong to different mesh gates, discard the firstdata frame in response to the determinations.
 8. The station accordingto claim 7, wherein the transceiver is further configured to: receive amanagement frame sent by the second mesh station, wherein a transmitteraddress of the management frame is the MAC address of the second meshstation, and wherein the management frame comprises an identifier of thesecond mesh gate; and the at least one processor is further configuredto: obtain a correspondence between the second mesh station and thesecond mesh gate; and determine, according to the MAC address of thesecond mesh station that is received by the transceiver and thecorrespondence between the second mesh station and the second mesh gate,that the first mesh station and the second mesh station belong todifferent mesh gates.
 9. The station according to claim 7, wherein theat least one processor is further configured to: determine a minimumoverhead between the first mesh station and each of multiple mesh gates;and select, according to the minimum overhead between the first meshstation and each of the multiple mesh gates, the first mesh gate as amesh gate to which the first mesh station belongs, wherein the multiplemesh gates comprise the first mesh gate and the second mesh gate, andwherein among the multiple mesh gates an overhead between the first meshgate and the first mesh station is the minimum overhead.
 10. The stationaccording to claim 7, wherein the transceiver is further configured toreceive a second data frame sent by a third mesh station, wherein atransmitter address of the second data frame is a MAC address of thethird mesh station, and wherein the third mesh station belongs to thefirst mesh gate; and the at least one processor is further configuredto: determine that the second data frame received by the transceiver isa broadcast data frame, a multicast data frame, or an unknown unicastdata frame; determine, according to the MAC address of the third meshstation that is received by the transceiver, that the first mesh stationand the third mesh station belong to a same mesh gate; and in responseto determining that the second data frame received by the transceiver isa broadcast data frame, a multicast data frame, or an unknown unicastdata frame and that the first mesh station and the third mesh stationbelong to a same mesh gate, process the second data frame received bythe transceiver.
 11. The station according to claim 7, wherein thetransceiver is further configured to receive a third data frame sent bythe second mesh station, wherein a transmitter address of the third dataframe is the MAC address of the second mesh station; and the at leastone processor is further configured to: determine that the third dataframe received by the transceiver is a known unicast data frame; and inresponse to determining that the third data frame received by thetransceiver is a known unicast data frame, forward the third data framereceived by the transceiver.
 12. The station according to claim 7,wherein the at least one processor is further configured to: determinethat a receiver address of a to-be-sent fourth data frame is the MACaddress of the second mesh station; determine that the fourth data frameis a broadcast data frame or a multicast data frame; and in response todetermining that the receiver address of a to-be-sent fourth data frameis the MAC address of the second mesh station and that the fourth dataframe is a broadcast data frame or a multicast data frame, skip sendingthe fourth data frame.
 13. A wireless local area network mesh networksystem, wherein the system comprises: a first mesh station, a secondmesh station, and a plurality of mesh gates, wherein the first meshstation is configured to: receive a first data frame sent by the secondmesh station, wherein a transmitter address of the first data frame is amedia access control (MAC) address of the second mesh station, whereinthe first mesh station belongs to a first mesh gate, and wherein thesecond mesh station belongs to a second mesh gate; and discard the firstdata frame when the first mesh station determines that the first dataframe is a broadcast data frame, a multicast data frame, or an unknownunicast data frame and determines, according to the MAC address of thesecond mesh station, that the first mesh station and the second meshstation belong to different mesh gates.
 14. The system according toclaim 13, wherein the first mesh station is further configured to:receive a management frame sent by the second mesh station, wherein atransmitter address of the management frame is the MAC address of thesecond mesh station, and wherein the management frame comprises anidentifier of the second mesh gate; and obtain a correspondence betweenthe second mesh station and the second mesh gate; and whereindetermining that the first mesh station and the second mesh stationbelong to different mesh gates comprises: determining, according to theMAC address of the second mesh station and the correspondence betweenthe second mesh station and the second mesh gate, that the first meshstation and the second mesh station belong to different mesh gates. 15.The system according to claim 13, wherein the first mesh station isfurther configured to: determine a minimum overhead between the firstmesh station and each of multiple mesh gates, wherein the multiple meshgates comprise the first mesh gate and the second mesh gate; and selectthe first mesh gate as a mesh gate to which the first mesh stationbelongs, wherein among the multiple mesh gates an overhead between thefirst mesh gate and the first mesh station is the minimum overhead. 16.The system according to claim 13, wherein the first mesh station isfurther configured to: receive a second data frame sent by a third meshstation, wherein a transmitter address of the second data frame is a MACaddress of the third mesh station, and wherein the third mesh stationbelongs to the first mesh gate; and determine that the second data frameis a broadcast data frame, a multicast data frame, or an unknown unicastdata frame; determine, according to the MAC address of the third meshstation, that the first mesh station and the third mesh station belongto a same mesh gate; and in response to determining that the second dataframe is a broadcast data frame, a multicast data frame, or an unknownunicast data frame and that the first mesh station and the third meshstation belong to a same mesh gate, process the second data frame inresponse to the determinations.
 17. The system according to claim 13,wherein the first mesh station is further configured to: receive a thirddata frame sent by the second mesh station, wherein a transmitteraddress of the third data frame is the MAC address of the second meshstation; and determine that the third data frame is a known unicast dataframe; and in response to determining that the third data frame is aknown unicast data frame, forward the third data frame.
 18. The systemaccording to claim 13, wherein the first mesh station is furtherconfigured to: determine that a receiver address of a to-be-sent fourthdata frame is the MAC address of the second mesh station; determine thatthe fourth data frame is a broadcast data frame or a multicast dataframe; and in response to determining that the receiver address of ato-be-sent fourth data frame is the MAC address of the second meshstation and that the fourth data frame is a broadcast data frame or amulticast data frame, skip sending the fourth data frame.